The form is also addressed in row-column format. This applet codes the indices into the form name. (e.g. J21, J02, etc).
//-------------MATRIX CREATION---------------- // Create row of a given size function matrixRow(row, side) { for (var i = 0; i < side; i++) this[i] = ((i == row) ? 1 : 0) this.length = side return this } // Create matrix of size: side x side function makeMatrix(side) { for (var i = 0; i < side; i++) this[i] = new matrixRow(i, side) this.length = side return this } //-------------2-D FORM---------------- <FORM> <INPUT NAME="J00" SIZE=6> <INPUT NAME="J01" SIZE=6> <INPUT NAME="J02" SIZE=6><p> <INPUT NAME="J10" SIZE=6> <INPUT NAME="J11" SIZE=6> <INPUT NAME="J12" SIZE=6><p> <INPUT NAME="J20" SIZE=6> <INPUT NAME="J21" SIZE=6> <INPUT NAME="J22" SIZE=6><p> <INPUT TYPE="BUTTON" VALUE="Reinit" onClick="initMatrix()"> <INPUT TYPE="BUTTON" VALUE="Reduce" onClick="doit()"> </FORM>